<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台--文章管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo isset($skin)?$skin:"";?>images/style.css" />
    <base target="_self"/>

    <script src='<?php echo isset($skin)?$skin:"";?>js/jquery.min.js'></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/jquery.form.min.js"></script>
    <script type="text/javascript" src="<?php echo isset($skin)?$skin:"";?>js/dist/dialog-min.js"></script>
    <script src="<?php echo isset($skin)?$skin:"";?>js/admin.js"></script>
    <script type="text/javascript">
        <!--
        $(document).ready(function () {
            $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
        });
        //-->
    </script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>/js/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artTemplate-plugin.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/form.js"></script>
    <script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/artDialog.js"></script>
<script type="text/javascript" charset="UTF-8" src="<?php echo isset($skin)?$skin:"";?>js/iframeTools.js"></script>
<link rel="stylesheet" href="<?php echo isset($skin)?$skin:"";?>js/artdialog.css" type="text/css">
</head>
<body>
<div class="hh6"></div>
<form action="" method="post" id="myForm">
    <table class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <thead>
        <tr class="n_bt"><td colspan="3" align="center">工作小助手系统</td></tr>
        <tr><th class="thbt" colspan="3">【<?php echo isset($title)?$title:"";?>】 <a href="?c=site&a=add">添加新的变量</a></th></tr>
        </thead>
        <tbody>
        <?php if(is_array($oj))  foreach($oj as $v) { ?>
        <tr>
            <td width="20%" height="30" align="right"><?php echo isset($v->des)?$v->des:"";?>：</td>

            <td width="32%" height="30">
                <?php if($v->type==1){?>
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" type="text" class="input400" id="title" size="30" value="<?php echo isset($v->values)?$v->values:"";?>" />
                <?php }elseif($v->type==2){?>
                <textarea name="filed[<?php echo isset($v->id)?$v->id:"";?>]" cols="50"  class="input400 textareah" rows="4"  ><?php echo isset($v->values)?$v->values:"";?></textarea>
                <?php }elseif($v->type==3){?>
                <input  class="radio"name="filed[<?php echo isset($v->id)?$v->id:"";?>]" id="filed<?php echo isset($v->id)?$v->id:"";?>_1" type="radio" value="1" <?php if($v->values){?>checked="checked"<?php }?> />
                <label for="filed<?php echo isset($v->id)?$v->id:"";?>_1" class="trigger"></label>是
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" class="radio" type="radio" id="filed<?php echo isset($v->id)?$v->id:"";?>_2" value="0"  <?php if(!$v->values){?>checked="checked"<?php }?> />
                <label for="filed<?php echo isset($v->id)?$v->id:"";?>_2" class="trigger"></label>否
                <?php }elseif($v->type==4){?>
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" type="number" class="input400" id="title" size="30" value="<?php echo isset($v->values)?$v->values:"";?>" />
                <?php }elseif($v->type==5){?>
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" type="url" class="input400" id="title" size="30" value="<?php echo isset($v->values)?$v->values:"";?>" />
                <?php }elseif($v->type==6){?>
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" class="radio1" type="radio" id="filed<?php echo isset($v->id)?$v->id:"";?>_2" value="0"  <?php if(!$v->values){?>checked="checked"<?php }?> />动态
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" class="radio1" type="radio" id="filed<?php echo isset($v->id)?$v->id:"";?>_2" value="1"  <?php if($v->values==1){?>checked="checked"<?php }?> />静态
                <input name="filed[<?php echo isset($v->id)?$v->id:"";?>]" class="radio1" type="radio" id="filed<?php echo isset($v->id)?$v->id:"";?>_2" value="2"  <?php if($v->values==2){?>checked="checked"<?php }?> />伪静态
                <?php }?>

            </td>
            <td width="45%" height="30">&nbsp; <a class="del" title="删除" href="?c=site&a=del&id=<?php echo isset($v->id)?$v->id:"";?>">删除</a></td>
        </tr>
        <?php }?>
        <tr>
            <td  height="30" align="right"></td>
            <td  height="40" align="left"><input type="submit" class="button" value="保存" />&nbsp;<input type="reset" class="button" value="取消设置" /></td>
            <td  height="30"></td>
        </tr>
        </tbody>
    </table>
    <input name="a" type="hidden" value="<?php echo isset($form_action)?$form_action:"";?>" />
</form>



<script>
    $(document).ready(function() {
        k_ajaxForm('#myForm',"",<?php if($id){?>false<?php }else{?>true<?php }?>);
    });
</script>
<script type="text/javascript">
    <!--
    $(document).ready(function () {
        $('.new_table tbody tr:even').addClass('h'); //奇偶变色，添加样式
    });

    //-->
    function alert_del(url) {
        if (confirm("您确定要删除吗？"))
            window.location = url;
        return false;
    }
</script>
</body>
</html>